﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YAPSAR
{
    public class Options
    {
        private static Options static_instance;
        public static Options Instance
        {
            get
            {
                if (static_instance == null)
                {
                    static_instance = new Options();
                }

                return static_instance;
            }
        }

        /// <summary>
        /// Gets or sets if we should always persist all words.
        /// Otherwise we only gather the words during a work unit to figure out what project and type it belongs to.
        /// </summary>
        public Boolean PersistAllWords { get; set; }

        public int TypedWordFrequencyThreshold { get; set; }


        public int TypedWordLengthThreshold { get; set; }

        public int PersistWorkUnitSecondsThreshold { get; set; }

        /// <summary>
        /// Gets or sets the number of seconds that we're allowed to be inactive before we're actually marked as inactive.
        /// Default is 60 seconds.
        /// </summary>
        public int InactiveSecondsThreshold { get; set; }

        private Options()
        {
            this.PersistAllWords = true;
            this.TypedWordFrequencyThreshold = 5;
            this.InactiveSecondsThreshold = 60;
            this.TypedWordLengthThreshold = 5;
            this.PersistWorkUnitSecondsThreshold = 10;
        }
    }
}
